package com.lxf.clouduser.bean;

import lombok.Data;
import lombok.NoArgsConstructor;
import lombok.experimental.Accessors;
import org.springframework.data.annotation.Id;
import org.springframework.data.elasticsearch.annotations.DateFormat;
import org.springframework.data.elasticsearch.annotations.Document;
import org.springframework.data.elasticsearch.annotations.Field;
import org.springframework.data.elasticsearch.annotations.FieldType;

import java.io.Serializable;
import java.util.List;

/**
 * @author 罗兴发
 * @data 2025/6/25 9:03
 * @description：客服咨询-实体类
 */
@Data
@Accessors(chain = true)  //链式结构
@NoArgsConstructor   //无参构造函数
@Document(indexName = "es") //创建的es库名称
public class UserServeBean implements Serializable {
    private static final long serialVersionUID = 1L;//控制序列化版本兼容
    @Id
    @Field(type = FieldType.Integer)
    private Integer usId;//表ID

    @Field(type = FieldType.Integer)
    private Integer userId;//发起人工客服的用户ID

    @Field(type = FieldType.Text)
    private String reqContent;//需求内容

    @Field(type = FieldType.Integer)
    private Integer isServe;//当前服务状态：0待服务 1已服务 2已完成

    @Field(type = FieldType.Integer)
    private Integer kfUserId;//服务的客服用户ID

    @Field(type = FieldType.Date, format = DateFormat.basic_date_time)
    private String addTime;//添加时间

    @Field(type = FieldType.Nested)
    private List<UserMsgBean> msgList;
}
